home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / leadz.z / leadz
Encoding:
Text File  |  1998-10-30  |  2.4 KB  |  73 lines

  1. LEADZ(3I)                                              Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      __lleeaaddzz, LLEEAADDZZ - Counts number of leading 0 bits
  6.  
  7. SSYYNNOOPPSSIISS
  8.      C/C++
  9.  
  10.      ##iinncclluuddee <<iinnttrriinnssiiccss..hh>>
  11.      iinntt __lleeaaddzz ((lloonngg _i))
  12.  
  13.      Fortran:
  14.  
  15.      LLEEAADDZZ (([[II==]]_i))
  16.  
  17. IIMMPPLLEEMMEENNTTAATTIIOONN
  18.      C/C++:  UNICOS and UNICOS/mk systems
  19.  
  20.      Fortran:  UNICOS, UNICOS/mk, and IRIX systems
  21.  
  22. SSTTAANNDDAARRDDSS
  23.      C/C++:  Cray Research extension
  24.  
  25.      Fortran:  CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran
  26.      90
  27.  
  28. DDEESSCCRRIIPPTTIIOONN
  29.      This intrinsic function counts the number of leading 0 bits in _i.
  30.  
  31. FFOORRTTRRAANN NNOOTTEESS
  32.      LLEEAADDZZ accepts the following argument:
  33.  
  34.      _i    A Boolean, integer, real, or Cray pointer value.
  35.  
  36.      LLEEAADDZZ is an elemental function.  The name of this function cannot be
  37.      passed as an argument.
  38.  
  39. CC//CC++++ NNOOTTEESS
  40.      Because __lleeaaddzz is an intrinsic function, no externally visible library
  41.      function is available for it.  The compiler generates inline code to
  42.      produce the result.
  43.  
  44. FFOORRTTRRAANN RREETTUURRNN VVAALLUUEESS
  45.      LLEEAADDZZ returns a value of type integer.
  46.  
  47. EEXXAAMMPPLLEESS
  48.      The following section of Fortran code shows the LLEEAADDZZ function used
  49.      with an argument of type integer.  The bit pattern of the argument and
  50.      the value of the result are also given.  For simplicity, a 16-bit
  51.      object is used.
  52.  
  53.           INTEGER I1, I2
  54.           ...
  55.           I2 = LEADZ(I1)
  56.  
  57.  
  58.            ---------------------------------------------------------------
  59.           | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
  60.            ---------------------------------------------------------------
  61.                                         I1
  62.  
  63.      The LLEEAADDZZ function returns the value 5 to the integer variable II22.
  64.  
  65. SSEEEE AALLSSOO
  66.      A complete list of C/C++ intrinsic functions available on Cray
  67.      Research systems is in the _C_r_a_y _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR
  68.      -2179.
  69.  
  70.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  71.      printed version of this man page.
  72.  
  73.